import Vue from 'vue'
import VueRouter from 'vue-router'
import Vuex from 'vuex'
import Meta from 'vue-meta'
Vue.use(Meta)

import App from './App.vue'
import createStore from './store'
import createRouter from './router'

import './assets/styles/global.styl'

Vue.use(Vuex)
Vue.use(VueRouter)

export default () => {
    const router = createRouter()
    const store = createStore()

    const app = new Vue({
        router,
        store,
        render: (h) => h(App)
    }).$mount('#root')

    return {
        app,
        router,
        store
    }
}